/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hu
 * Date: 2024-04-24
 * Time: 23:24
 */
import java.util.Scanner;
public class Test {
    public static void main(String[] args) {
        int sum = 0;
        int num = 1;
        while(num <= 5){
            int factorResult = 1;
            int tmp = 1;
            while(tmp <= num){
                factorResult *= tmp;
                tmp++;
            }
            sum += factorResult;
            num++;
        }
        System.out.println(sum);
    }
    public static void main5(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入你的名字：");
        String name = sc.nextLine();
        System.out.println("请输入你的年龄：");
        int age = sc.nextInt();
        System.out.println("请输入你的工资：");
        float salary = sc.nextFloat();
        System.out.println("你的信息如下：");
        System.out.println("姓名："+name+"\n"+"年龄："+age+"\n"+"工资："+salary);
        sc.close();
    }
}
